//
//  SQLiteDataBaseManager.h
//  18-SQLite
//
//  Created by Snow on 16/8/8.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SQLiteDataBaseManager.h"
#import <sqlite3.h>
#import "Student.h"
@class Student;
NS_ASSUME_NONNULL_BEGIN
@interface SQLiteDataBaseManager : NSObject {
    sqlite3 *dbPoint;
}
//单例方法 , 一个工程中, 只包含这一个对象
+ (SQLiteDataBaseManager *)sharedManager;
//打开数据库
- (BOOL)openSQLite3;
//关闭数据库
- (BOOL)closeSQLite3;
//创建表
- (BOOL)createTable;
//添加数据
- (BOOL)insertStu:(Student *)stu;
//删除数据
- (BOOL)deleteStu:(Student *)stu;
//删除全部
- (BOOL)deleteAll;
//更新数据
- (BOOL)updateOldName:(NSString *)oldName
              newName:(NSString *)newName;
- (__kindof NSArray *)searchAll;

@end
NS_ASSUME_NONNULL_END
